# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=grilo-plugins
pkgver=0.3.8
pkgrel=1
pkgdesc="A collection of plugins for the Grilo framework"
url="https://gitlab.gnome.org/GNOME/grilo-plugins"
arch=(x86_64)
license=(LGPL)
depends=(grilo lua libmediaart libgdata tracker gom libdmapsharing chromaprint gst-plugins-bad
         gmime3)
makedepends=(git meson gperf yelp-tools)
checkdepends=(gst-plugins-good gst-plugins-base)
optdepends=('dleyna-server: DLNA plugin'
            'tracker-miners: Tracker plugin')
groups=(gnome)
_commit=29dc976e010bfff6d0bfd92aae886944e8e708b8  # tags/grilo-plugins-0.3.8^0
source=("git+https://gitlab.gnome.org/GNOME/grilo-plugins.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^grilo-plugins-//;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  ninja -C build
}

check() {
  # Unreliable tests using websites...
  meson test -C build || :
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
